Inline Code Folding Widgets
Software developers generally write software applications using text editors, which are systems or programs that allow a user to edit code as text. Text editors may be terminal-based, or may provide a Graphical User Interface (GUI). In most instances, text editors will display code as a simple editable text area and provide syntax highlighting. Sometimes these text editors are part of a larger application, an Integrated Development Environment (IDE), which typically consist of a text editor, a compiler, a debugger, and a GUI. IDEs offer the user additional features for editing, running, compiling, and debugging code, often through the use of the IDE's GUI.
Code folding is a feature of IDEs that replaces large portions of text with “inline widgets.” A widget is a component of a GUI that enables a user to perform a function. Inline widgets are parts of the text editing environment that generally behave like normal text except that they can be expanded and collapsed to hide or reveal “folded” (temporary hidden) code. For example, code folding (in JetBrains' IntelliJ) collapses inner Java classes to “˜>” to hide code which the user does not need to see very frequently. Hovering the mouse over the inline widget will reveal a preview of the code that has been folded. This is the extent of the functionality of inline widgets in most existing code editing software.
IDEs With Visual Code Editing Tools
IDEs such as Visual Studio, Dreamweaver, or more recently Adobe Edge, have attempted to let the user edit both code and visual properties (such as colors, sizes, and positions of components in the application being developed) in the same tool. Here, the IDE scans the user's code and when the user's cursor enters a certain text range, the IDE will display related details about what the code represents in the component being developed (e.g., color, size, positioning) in an inspector view (an inspector is part of the IDE's GUI which shows properties of the code and application currently being edited and the inspector may allow these properties to be edited through the inspector). This is potentially problematic from the user's perspective, since it is unclear exactly which parts of their code are special and match up to visual properties in the inspector. An additional problem relates to storing the visual properties added/modified by the inspector: the editor must either place all of the visual properties as code in the text editor for them to be saved (in which case, cluttering the user's code), or they must be saved outside of the user's code (e.g., a separate CSS file) which would require the user to find and open another file. With this method of providing GUI editing tools for code, it is difficult for the IDE to seamlessly provide abstractions and additional features through code generated by the IDE without exposing said generated code to the user.
Visual Programming Environment
Visual programming environments like Quartz Composer by Apple, Inc., or RelativeWave Flow (now owned by Google) introduced a programming environment that does not use a text editor as the primary means of developing an application. Instead, these tools use a variety of widgets in the GUI, which a user can connect to one another in order to build an application. While these tools offer features around understanding and inspecting the state of a running application, they do not provide the power and flexibility of being able to edit the underlying code. A user has no way to write an application almost entirely in code with these tools, which is often a faster and more effective means of developing an application. If the user wants to do something not supported by the visual programing environment they are unable simply to take their code into another environment and continue working on it there, because they do not have access to the majority of the application's code.